package com.kll.tv.views.adapter

import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.kll.tv.R
import com.kll.tv.databinding.ItemPopPersonalSexBinding

class PersonalSexPopAdapter(context: Context, listener: View.OnClickListener) : BasePopWindowAdapter(), View.OnClickListener {
    private var binding: ItemPopPersonalSexBinding? = null
    private var listener: View.OnClickListener = listener

    override fun getView(context: Context?, parent: ViewGroup?): View {
        if (binding == null) {
            val view = LayoutInflater.from(context).inflate(R.layout.item_pop_personal_sex, parent, false)
            binding = ItemPopPersonalSexBinding.bind(view)
            binding!!.tvNan.setOnClickListener(this)
            binding!!.tvNv.setOnClickListener(this)
            binding!!.tvCancel.setOnClickListener(this)
        }
        return binding!!.root
    }

    override fun onClick(v: View?) {
        listener.onClick(v)
    }

}